<template>
  <component :is="current" v-bind="$props" @cellClick="cellClick" />
</template>
<script>
// 楼栋记录展示。根据验收对象使用对应组件
import { recordMixin } from './mixin'
import Piles from './Piles'
import PublicArea from './PublicArea'
import Walls from './Walls'
import Spaces from './Spaces'
const cpnMap = { 4: 'Piles', 5: 'PublicArea', 6: 'Walls', 7: 'Spaces' }
export default {
  name: 'BuildingRecord',
  components: { Piles, PublicArea, Walls, Spaces },
  mixins: [recordMixin],
  computed: {
    current() {
      return cpnMap[this.unitType] || ''
    }
  }
}
</script>
